// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.ast;

import codej.ast.*;

/** @author Luca Marrocco */
public class LocalVariableDeclaration extends Statement {

	private Type type;
	private boolean isFinal = false;

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public LocalVariableDeclaration addVariableDeclarator(VariableDeclarator variableDeclarator) {
		addChild(variableDeclarator);
		return this;
	}

	public boolean getFinal() {
		return isFinal;
	}

	public Type getType() {
		return type;
	}

	public boolean isFinal() {
		return isFinal;
	}

	public LocalVariableDeclaration setFinal(boolean isFinal) {
		this.isFinal = isFinal;

		return this;
	}

	public LocalVariableDeclaration setType(Type type) {
		this.type = type;

		return this;
	}
}
